import { ProfileInfo } from '@/store/reducer/user';
import request from '@/utils/request';
import Profile from './../pages/Profile/index';
/** 获取个人资料 */
export const loadProfileAPI = () => {
  return request({
    url: '/v1_0/user/profile',
  });
};

export const editPhotoAPI = (data: FormData) => {
  return request({
    url: '/v1_0/user/photo',
    method: 'patch',
    data,
  });
};

export const editProfileAPI = (data: Partial<ProfileInfo>) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'patch',
    data,
  });
};
